package com.ccrfid.rmc6.repository.video;

import com.ccrfid.rmc6.entity.video.VideoCameraEntity;
import org.springframework.data.repository.Repository;

import java.util.List;

public interface VideoCameraRepository extends Repository<VideoCameraEntity, Long> {
    //
    VideoCameraEntity getById(Long id);

    //
    VideoCameraEntity getByCameraSn(String cameraSn);

    //
    List<VideoCameraEntity> getAllByOrgSn(String orgSn);

    List<VideoCameraEntity> getAllByIdIn(List<Long> idList);

    //
    void deleteById(Long id);

    void deleteByIdIn(List<Long> idList);

    //
    Boolean existsByCameraSn(String cameraSn);

    Boolean existsById(Long id);

    Boolean existsByCameraSnAndIdNot(String cameraSn, Long id);

    //
    VideoCameraEntity save(VideoCameraEntity entity);
}
